# -*- coding: utf-8 -*-
from django.db import models

# Create your models here.
class Open_history(models.Model):
    # 体彩 福彩
    lottery_publisher = models.CharField(max_length=20)
    lottery_name = models.CharField(max_length=200)
    # 彩种编号 对应彩票名称一个表
    # 双色球 1  
    # 大乐透 2
    # 3D 3
    # 7星彩 4
    # 排列3 5
    # 排列5 6
    # 七乐彩 7
    lottery_id = models.IntegerField(db_index=True)
    # 可以用那些算法 is json list
    # 开奖时间
    open_date = models.TextField(null=True)
    # 期号
    code = models.IntegerField(null=True)
    # red is json list
    red_list = models.TextField(null=True)
    # orange is json list
    orange_list = models.TextField(null=True)
    # blue is json list
    blue_list = models.TextField(null=True)
    # solida is json list
    solida_list = models.TextField(null=True)

class Alg_everyone(models.Model):
    # 算法名字对应算法，有一个对应表
    alg_name = models.TextField(null=True)
    # alg_data is json list,是算法预测的数字
    # {'kill':{}, 'will':{}}
    # kill/will : {'red':[],'blue':[],'orange':[],'solida':[]}
    alg_data = models.TextField(null=True)
    link = models.ForeignKey("Open_history",on_delete=models.CASCADE)